﻿using Firefly.Framework.Windows;
using Firefly.Framework.Windows.ContentReaders;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;
using Microsoft.Xna.Framework.Graphics;

namespace Firefly.ContentPipeline.Windows
{
    [ContentTypeWriter]
    public class CursorContentWriter : ContentTypeWriter<Cursor>
    {
        protected override void Write(ContentWriter output, Cursor value)
        {

            output.Write(value.AssetName);
            output.WriteObject<Point>(value.Offset);
            output.WriteObject<Color>(value.Color);
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(CursorContentReader).AssemblyQualifiedName;
        }
    } 
}
